package orchestration.businessprocess.model;

import java.util.HashMap;

import orchestration.businessprocess.model.nodes.BPNode;

/**
 * A description of an Annotation attached to some {@link BPNode}
 * @author  <a href="mailto:car.ferrarini@gmail.com">Carlo Ferrarini</a>
 */
public class BPAnnotation {

	/**
	 * @uml.property  name="id"
	 */
	private String id;
	/**
	 * @uml.property  name="source"
	 */
	private String source;
	/**
	 * @uml.property  name="details"
	 */
	private HashMap<String,String> details;
	public BPAnnotation(String id, String source){
		this.id=id;
		this.source=source;
		this.details= new HashMap<String, String>();
	}
	public BPAnnotation(String id, String source,HashMap<String,String> details){
		this.id=id;
		this.source=source;
		this.details= details;
	}
	/**
	 * @return
	 * @uml.property  name="id"
	 */
	public String getId() {
		return id;
	}
	/**
	 * @return
	 * @uml.property  name="source"
	 */
	public String getSource() {
		return source;
	}
	public void putDetail(String key,String value){
		this.details.put(key, value);
	}
	public String getDetail(String key){
		return this.details.get(key);
	}
	/**
	 * @return
	 * @uml.property  name="details"
	 */
	protected HashMap<String, String> getDetails() {
		return details;
	}
}
